package com.stox.client.ui.javafx.chartingy.persistence.chart.dto;

import java.io.Serializable;
import java.util.List;

import com.stox.client.ui.javafx.chartingy.model.enumeration.BarType;
import com.stox.client.ui.javafx.chartingy.model.enumeration.Overlay;
import com.stox.client.ui.javafx.chartingy.view.ChartingView;
import com.stox.shared.core.model.enumeration.BarSpan;
import com.stox.shared.core.model.enumeration.Span;

public class ChartingViewDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	private Span span;
	private BarSpan barSpan;
	private BarType barType;
	private Double barGap;
	private double pnfBoxSize;
	private boolean pnfBoxSizeInPercentage;
	private int pnfReversalAmount;
	private double kagiReversalSize;
	private boolean kagiReversalSizeInPercentage;
	private double renkoReversalSize;
	private boolean renkoReversalSizeInPercentage;
	private int lineBreakReversalAmount;
	private boolean maintainRatio;
	private Overlay volumePlotOverlay;
	private double rangeSliderLowValue;
	private double rangeSliderHighValue;
	private ChartDTO<PricePlotDTO> primaryChart;
	private List<ChartDTO<IndicatorPlotDTO>> secondaryCharts;
	
	public ChartingViewDTO() {
		
	}
	
	public ChartingViewDTO(ChartingView view) {
		span = view.getSpan();
		barSpan = view.getBarSpan();
		barType = view.getBarType();
		barGap = view.getBarGap();
		pnfBoxSize = view.getPnfBoxSize();
		pnfBoxSizeInPercentage = view.isPnfBoxSizeInPercentage();
		pnfReversalAmount = view.getPnfReversalAmount();
		kagiReversalSize = view.getKagiReversalSize();
		kagiReversalSizeInPercentage = view.isKagiReversalSizeInPercentage();
		renkoReversalSize = view.getRenkoReversalSize();
		renkoReversalSizeInPercentage = view.isRenkoReversalSizeInPercentage();
		lineBreakReversalAmount = view.getLineBreakReversalAmount();
		maintainRatio = view.isMaintainRatio();
		volumePlotOverlay = view.getVolumePlot().getOverlay();
		rangeSliderHighValue = view.getRangeSlider().getHighValue();
		rangeSliderLowValue = view.getRangeSlider().getLowValue();
	}
	
	public Span getSpan() {
		return span;
	}
	public void setSpan(Span span) {
		this.span = span;
	}
	public BarSpan getBarSpan() {
		return barSpan;
	}
	public void setBarSpan(BarSpan barSpan) {
		this.barSpan = barSpan;
	}
	public BarType getBarType() {
		return barType;
	}
	public void setBarType(BarType barType) {
		this.barType = barType;
	}
	public Double getBarGap() {
		return barGap;
	}
	public void setBarGap(Double barGap) {
		this.barGap = barGap;
	}
	public double getPnfBoxSize() {
		return pnfBoxSize;
	}
	public void setPnfBoxSize(double pnfBoxSize) {
		this.pnfBoxSize = pnfBoxSize;
	}
	public boolean isPnfBoxSizeInPercentage() {
		return pnfBoxSizeInPercentage;
	}
	public void setPnfBoxSizeInPercentage(boolean pnfBoxSizeInPercentage) {
		this.pnfBoxSizeInPercentage = pnfBoxSizeInPercentage;
	}
	public int getPnfReversalAmount() {
		return pnfReversalAmount;
	}
	public void setPnfReversalAmount(int pnfReversalAmount) {
		this.pnfReversalAmount = pnfReversalAmount;
	}
	public double getKagiReversalSize() {
		return kagiReversalSize;
	}
	public void setKagiReversalSize(double kagiReversalSize) {
		this.kagiReversalSize = kagiReversalSize;
	}
	public boolean isKagiReversalSizeInPercentage() {
		return kagiReversalSizeInPercentage;
	}
	public void setKagiReversalSizeInPercentage(boolean kagiReversalSizeInPercentage) {
		this.kagiReversalSizeInPercentage = kagiReversalSizeInPercentage;
	}
	public double getRenkoReversalSize() {
		return renkoReversalSize;
	}
	public void setRenkoReversalSize(double renkoReversalSize) {
		this.renkoReversalSize = renkoReversalSize;
	}
	public boolean isRenkoReversalSizeInPercentage() {
		return renkoReversalSizeInPercentage;
	}
	public void setRenkoReversalSizeInPercentage(boolean renkoReversalSizeInPercentage) {
		this.renkoReversalSizeInPercentage = renkoReversalSizeInPercentage;
	}
	public int getLineBreakReversalAmount() {
		return lineBreakReversalAmount;
	}
	public void setLineBreakReversalAmount(int lineBreakReversalAmount) {
		this.lineBreakReversalAmount = lineBreakReversalAmount;
	}
	public boolean isMaintainRatio() {
		return maintainRatio;
	}
	public void setMaintainRatio(boolean maintainRatio) {
		this.maintainRatio = maintainRatio;
	}
	public Overlay getVolumePlotOverlay() {
		return volumePlotOverlay;
	}
	public void setVolumePlotOverlay(Overlay volumePlotOverlay) {
		this.volumePlotOverlay = volumePlotOverlay;
	}
	public ChartDTO<PricePlotDTO> getPrimaryChart() {
		return primaryChart;
	}
	public void setPrimaryChart(ChartDTO<PricePlotDTO> primaryChart) {
		this.primaryChart = primaryChart;
	}
	public List<ChartDTO<IndicatorPlotDTO>> getSecondaryCharts() {
		return secondaryCharts;
	}
	public void setSecondaryCharts(List<ChartDTO<IndicatorPlotDTO>> secondaryCharts) {
		this.secondaryCharts = secondaryCharts;
	}

	public double getRangeSliderLowValue() {
		return rangeSliderLowValue;
	}

	public void setRangeSliderLowValue(double rangeSliderLowValue) {
		this.rangeSliderLowValue = rangeSliderLowValue;
	}

	public double getRangeSliderHighValue() {
		return rangeSliderHighValue;
	}

	public void setRangeSliderHighValue(double rangeSliderHighValue) {
		this.rangeSliderHighValue = rangeSliderHighValue;
	}
}
